package dongshi.daddy.singleton.hungry;
 
//饿汉式单例
public class Hungry {
    //构造器私有，别人就无法去new这个对象，保证内存中只有一个对象
    private Hungry(){
    }
 
    private final static Hungry HUNGRY = new Hungry();
 
    public static Hungry getInstance(){
        return HUNGRY;
    }
}